package com.gx.mxbbx.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.gx.mxbbx.dao.PaymentMapper;
import com.gx.mxbbx.po.Rural;
import com.gx.mxbbx.service.PaymentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;
import java.util.List;

@Service
@Transactional
public class PaymentServiceImpl implements PaymentService {
    @Autowired
    private PaymentMapper paymentMapper;

    public PageInfo<Rural> getruralList(String fullName, Integer currentPage, Integer limit) {
        PageHelper.startPage(currentPage, limit);
        List<Rural> list = paymentMapper.getruralList(fullName);
        PageInfo<Rural> pageInfo = new PageInfo<Rural>(list);
        return pageInfo;
    }

    public PageInfo<Rural> ruralpayment(String familyId, Integer currentPage, Integer limit) {
        PageHelper.startPage(currentPage, limit);
        List<Rural> list = paymentMapper.ruralpayment(familyId);
        PageInfo<Rural> pageInfo = new PageInfo<Rural>(list);
        return pageInfo;
    }
}
